package com.medical.controller;

import com.medical.service.WordCloudService;
import com.medical.domain.R;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wordcloud")
public class WordCloudController {

    @Resource
    private WordCloudService wordCloudService;

    @GetMapping("/keywords")
    public R<List<Map<String, Object>>> getKeywords() {
        return R.ok(wordCloudService.analyzeKeywords());
    }
}
